<template>
  <div class="stat-container">
    <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item>首页</el-breadcrumb-item>
      <el-breadcrumb-item>数据统计</el-breadcrumb-item>
    </el-breadcrumb>
    <el-card class="box-card">
      <!-- 为 ECharts 准备一个定义了宽高的 DOM -->
      <div id="main" style="width: 1000px;height:400px;"></div>
    </el-card>
  </div>
</template>

<script>
// 引入 echarts 核心模块，核心模块提供了 echarts 使用必须要的接口。
import * as echarts from 'echarts'
export default {
  name: 'StatCpm',
  data() {
    return {}
  },
  created() {},
  mounted() {
    var myChart = echarts.init(document.getElementById('main'))
    myChart.setOption({
      title: {
        text: '近1周成交量'
      },
      tooltip: {},
      xAxis: {
        data: ['2022-11-22', '2022-11-21', '2022-11-20', '2022-11-19', '2022-11-18', '2022-11-17', '2022-11-16']
      },
      yAxis: {},
      series: [
        {
          name: '成交量',
          type: 'bar',
          data: [5, 50, 36, 40, 55, 66, 88],
          itemStyle: {
            color: '#6a9d03'
          }
        }
      ]
    })
  }
}
</script>

<style scoped>
.box-card {
  margin-top: 20px;
}
</style>
